Tree canopy
Population-based Scenario: AI: Increase by 10% in all zip codes
Targeted
Scenario AII1: Increase by 10% in zip codes in the lowest 1/5th of current TC cover (i.e. <=20th pctile)
Scenario AII2: Increase by 10% in zip codes in the highest 1/5th of the Social Vulnerability Index (i.e. >80th pctile)
Scenario AII3: Increase by 10% in zip codes in the highest 1/5th of hospitalization burden (i.e. >80th pctile)
Proportionate-universalism
Scenario AIII1: Increase by 10% for bottom 1/5th of current TC cover… down to 2% for top 1/5th
Scenario AIII2: Increase by 10% for top 1/5th of SVI … down to 2% for bottom 1/5th
Scenario AIII3: Increase by 10% for top 1/5th of hospitalization burden … down to 2% for bottom 1/5th
Impervious surface cover
Population-based: Scenario BI: Decrease by 10% in all zip codes
Targeted
Scenario BII1: Decrease by 10% in zip codes in the highest 1/5th of current imperv cover (i.e. >80th pctile)
Scenario BII2: Decrease by 10% in zip codes in the highest 1/5th of the Social Vulnerability Index (i.e. >80th pctile)
Scenario BII3: Decrease by 10% in zip codes in the highest 1/5th of hospitalization burden (i.e. >80th pctile)
Proportionate-universalism
Scenario BIII1: Decrease by 10% for top 1/5th of current imperv cover … down to 2% for bottom 1/5th
Scenario BIII2: Decrease by 10% for top 1/5th of SVI … down to 2% for bottom 1/5th
Scenario BIII3: Decrease by 10% for top 1/5th of hospitalization burden … down to 2% for bottom 1/5th
Facet by type of intervention (impervious surfaces vs tree canopy) and by scenario type - Population-based, Proportionate Universalism, Targeted
facet_histogram_fun=function(df){
df %>%
ggplot(aes(value))+
geom_histogram()+
facet_grid(
rows=vars(scenario_type_7_abbrev),
cols=vars(scenario_intervention)
)
}
hosp_all_long %>%
filter(measure=="irr") %>%
facet_histogram_fun()+
xlab("IRR")
#All IRD
hosp_all_long %>%
filter(measure=="ird") %>%
facet_histogram_fun()+
xlab("IRD")
#Exclude outliers
hosp_all_long %>%
filter(measure=="ird") %>%
filter(value<0.005) %>%
facet_histogram_fun()+
xlab("IRD")
hosp_all_long %>%
filter(measure=="pd") %>%
facet_histogram_fun()+
xlab("PD")
Note I took the mean of each measure over all zip codes. For the ratios and percent differences, I would suggest calculating the mean a different way: calculate the total number of baseline hospitalizations and the total number of hospitalizations prewvented - over all zip codes and then calculate the corresponding measure (IRR or PD).
I think the means would be the same for the IRDs but not for the IRRs and PDs
hosp_all_long %>%
filter(measure=="irr") %>%
group_by(measure, scenario) %>%
summarise(irr_mean=mean(value,na.rm=TRUE)) %>%
ungroup() %>%
left_join(lookup_scenario, by ="scenario") %>%
ggplot(aes(y=irr_mean,x=scenario_type_7_abbrev))+
geom_col()+
labs(x="Scenario", y="Mean IRR over ZCTA")+
facet_grid(
#Move facet down to x-axis
#https://stackoverflow.com/questions/67519146/bar-plot-with-named-groups-on-x-axis-in-ggplot2
cols=vars(scenario_intervention),
scales="free_x",
space="free_x",
switch="x"
)+
theme(panel.spacing = unit(0, units = "cm"), # removes space between panels
strip.placement = "outside", # moves the states down
strip.background = element_rect(fill = "white")
)
## `summarise()` has grouped output by 'measure'. You can override using the
## `.groups` argument.
hosp_all_long %>%
filter(measure=="ird") %>%
group_by(measure, scenario) %>%
summarise(ird_mean=mean(value,na.rm=TRUE)) %>%
ungroup() %>%
left_join(lookup_scenario, by ="scenario") %>%
ggplot(aes(y=ird_mean,x=scenario_type_7_abbrev))+
geom_col()+
labs(x="Scenario", y="Mean IRD over ZCTA")+
facet_grid(
#Move facet down to x-axis
#https://stackoverflow.com/questions/67519146/bar-plot-with-named-groups-on-x-axis-in-ggplot2
cols=vars(scenario_intervention),
scales="free_x",
space="free_x",
switch="x"
)+
theme(panel.spacing = unit(0, units = "cm"), # removes space between panels
strip.placement = "outside", # moves the states down
strip.background = element_rect(fill = "white")
)
## `summarise()` has grouped output by 'measure'. You can override using the
## `.groups` argument.
hosp_all_long %>%
filter(measure=="pd") %>%
group_by(measure, scenario) %>%
summarise(pd_mean=mean(value,na.rm=TRUE)) %>%
ungroup() %>%
left_join(lookup_scenario, by ="scenario") %>%
ggplot(aes(y=pd_mean,x=scenario_type_7_abbrev))+
geom_col()+
labs(x="Scenario", y="Mean PD over ZCTA")+
facet_grid(
#Move facet down to x-axis
#https://stackoverflow.com/questions/67519146/bar-plot-with-named-groups-on-x-axis-in-ggplot2
cols=vars(scenario_intervention),
scales="free_x",
space="free_x",
switch="x"
)+
theme(panel.spacing = unit(0, units = "cm"), # removes space between panels
strip.placement = "outside", # moves the states down
strip.background = element_rect(fill = "white")
)
## `summarise()` has grouped output by 'measure'. You can override using the
## `.groups` argument.
Ideas for static maps of measures using facet plots
A couple of ideas.
Please navigate to the layer icon under the Zoom icon and select the layer corresponding to each type of intervention.